<template>
    <div :render="render" :row="row" :index="index" :column="item" />
</template>

<script>
export default {
    name: 'VSlot',
    props: {
        row: Object,
        render: Function,
        index: Number,
        column: {
            type: Object,
            default: null
        }
    },
    setup(props) {
        return () => {
            const params = {
                row: props.row,
                index: props.index
            }
            if (props.column) params.column = props.column
            return props.render(params)
        }
    }
}
</script>
